Add GnuTLS support for W32 and certificate and hostname verification in GnuTLS.
authorTed Zlatanov <tzz@lifelogs.com>
Mon, 25 Apr 2011 01:30:51 +0000 (20:30 -0500)
committerTed Zlatanov <tzz@lifelogs.com>
Mon, 25 Apr 2011 01:30:51 +0000 (20:30 -0500)
commita7305dc126a0f169cf1e433789b10ba5cbcacb47
tree286da0a1425125a7e9925c4a1871a812dc92c596
parentfb1ee805e519a035a2c67c872a1b03685451c670
Add GnuTLS support for W32 and certificate and hostname verification in GnuTLS.

* src/gnutls.c: Renamed global_initialized to
gnutls_global_initialized.  Added internals for the
:verify-hostname-error, :verify-error, and :verify-flags
parameters of `gnutls-boot' and documented those parameters in the
docstring.  Start callback support.
(emacs_gnutls_handshake): Add Woe32 support. Retry handshake
unless a fatal error occured. Call gnutls_alert_send_appropriate
on error. Return error code.
(emacs_gnutls_write): Call emacs_gnutls_handle_error.
(emacs_gnutls_read): Likewise.
(Fgnutls_boot): Return handshake error code.
(emacs_gnutls_handle_error): New function.
(wsaerror_to_errno): Likewise.

* src/gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
callbacks stage.

* src/w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
(emacs_gnutls_push): Likewise.

* src/w32.h (emacs_gnutls_pull): Add prototype.
(emacs_gnutls_push): Likewise.
src/ChangeLog
src/gnutls.c
src/gnutls.h
src/makefile.w32-in
src/process.c
src/w32.c
src/w32.h